var should = require('should');
var luckyBoxHandler = require('../../../app/servers/user/handler/luckyBoxHandler.js');
var roleModel = require('../../../app/models/roleModel');
var config = require('../../config');
var configUtil = require('../../../app/util/configUtil');
var analyze = require('kc-analyze');

suite('测试luckyBoxHandler', function () {
    suite('receiveReward', function () {

        setup(function (done) {
            var analyze_config = configUtil.load('analyze');
            var game_config = configUtil.load('game');
            analyze.initialize({
                host: analyze_config.host,
                server_id: game_config.server_id
            });
            done();
        });

        test('领取宝箱奖励', function (done) {
            var msg = {};
            msg.box_id = 1;
            var session = {};
            session.uid = config.role_id;

            var lucky_box_handler = new luckyBoxHandler();
            lucky_box_handler.receiveReward(msg, session, function (err, res) {
                console.log('res:', res);
                done();
            });
        });

        // test('宝箱列表', function (done) {
        //     var msg = {};
        //     var session = {};
        //     session.uid = config.role_id;

        //     var lucky_box_handler = new luckyBoxHandler();
        //     lucky_box_handler.list(msg, session, function (err, res) {
        //         console.log('res:', res);
        //         done();
        //     });
        // });
    });
});
